package com.ttn.student.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ttn.common.core.entity.studentrecord.TestStudyRecord;
import com.ttn.common.core.entity.studentrecord.query.UnitReportQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TestStudyRecordMapper extends BaseMapper<TestStudyRecord> {
    List<TestStudyRecord> queryTestStudyRecordByUnitId(@Param("unitId") Integer unitId,
                                                       @Param("studentId") Integer studentId);

    int queryTotalTestStudyRecordByUnitIdId(@Param("unitId") Integer unitId,
                                           @Param("studentId") Integer studentId);

    int queryTotalCorrectAmountByUnitIdId(@Param("unitId") Integer unitId,
                                          @Param("studentId") Integer studentId);

    List<TestStudyRecord> queryUnitReport(@Param("qo") UnitReportQuery unitReportQuery);

    int querySumCourseUnitNumber(@Param("grade") Integer grade,
                                 @Param("studentId") Integer studentId);
}